package simple.utils.data.serializers;

import simple.utils.data.Bytes;

import java.io.IOException;

/**
 * Created by rehak on 5/7/14.
 */
public class CharSerializer implements Serializer<Character> {
    @Override
    public byte[] toBytes(Character character) throws IOException {
        return Bytes.charToBytes(character);
    }

    @Override
    public Character fromBytes(byte[] data) throws IOException {
        return Bytes.bytesToChar(data);
    }
}
